package com.hd.trans.db.bean;

import android.os.Parcel;
import android.os.Parcelable;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Property;
import org.greenrobot.greendao.annotation.Generated;
@Entity
public class OCRImageHistory implements Parcelable {
    @Id(autoincrement = true)
    private Long id;

    @Property(nameInDb = "photo_path")
    private String photoPath;

    @Property(nameInDb = "ocr_result")
    private String ocrResult;

    protected OCRImageHistory(Parcel in) {
        if (in.readByte() == 0) {
            id = null;
        } else {
            id = in.readLong();
        }
        photoPath = in.readString();
        ocrResult = in.readString();
    }

    @Generated(hash = 1266733017)
    public OCRImageHistory(Long id, String photoPath, String ocrResult) {
        this.id = id;
        this.photoPath = photoPath;
        this.ocrResult = ocrResult;
    }

    @Generated(hash = 1393100500)
    public OCRImageHistory() {
    }

    public static final Creator<OCRImageHistory> CREATOR = new Creator<OCRImageHistory>() {
        @Override
        public OCRImageHistory createFromParcel(Parcel in) {
            return new OCRImageHistory(in);
        }

        @Override
        public OCRImageHistory[] newArray(int size) {
            return new OCRImageHistory[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        if (id == null) {
            parcel.writeByte((byte) 0);
        } else {
            parcel.writeByte((byte) 1);
            parcel.writeLong(id);
        }
        parcel.writeString(photoPath);
        parcel.writeString(ocrResult);
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getPhotoPath() {
        return this.photoPath;
    }

    public void setPhotoPath(String photoPath) {
        this.photoPath = photoPath;
    }

    public String getOcrResult() {
        return this.ocrResult;
    }

    public void setOcrResult(String ocrResult) {
        this.ocrResult = ocrResult;
    }
}
